package org.come.Jpanel;

import com.tool.btn.XYBtn;
import com.tool.tcpimg.UIUtils;

import javax.swing.*;
import java.awt.*;



public class XinYuanChengShengJpane extends JPanel {
    public static XYBtn chengsheng, buchengsheng;

    public XinYuanChengShengJpane() {
        setPreferredSize(new Dimension(770, 480));
        setOpaque(false);
        setLayout(null);
        chengsheng = new XYBtn("skin/8100226/button/成圣按钮.png", 1, 445, this, "一念成圣");
        chengsheng.setBounds(445, 390 + 60, 104, 32);
        this.add(chengsheng);
        buchengsheng = new XYBtn("skin/8100226/button/成圣按钮.png", 1, 446, this, "心意未定");
        buchengsheng.setBounds(250, 390 + 60, 104, 32);
        this.add(buchengsheng);

    }

    private ImageIcon icon;

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (icon == null) {
            icon = new ImageIcon("inkImg/newbackground/CSZLxz.png");
        }
        g.drawImage(icon.getImage(), 0, 0, 770, 480, this);
        // g.drawRect(360,355,200,95);
        g.setColor(Color.yellow);
        g.setFont(UIUtils.TEXT_FONT2);
    }

    public static XYBtn getBuchengsheng() {
        return buchengsheng;
    }

    public static void setBuchengsheng(XYBtn buchengsheng) {
        XinYuanChengShengJpane.buchengsheng = buchengsheng;
    }
}
